package com.yuri.platform.core.entry;

import org.apache.commons.lang3.StringUtils;

import java.util.UUID;

public class BaseEntry {
    private String id;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    private Boolean isNewRecord;

    public Boolean getIsNewRecord() {
        return StringUtils.isBlank(id);
    }

    public void preInsert() {
        String uuid = UUID.randomUUID().toString().replace("-", "");
        this.setId(uuid);
    }
}
